import threading
import time

def job():
    print('T1 start\n')
    for i in range(10):
        time.sleep(0.1)
    print('T1 finish\n')

def job2():
    print('T2 start\n')
    print('T2 finish\n')

def main():
    t = threading.Thread(target=job,name='t') #target目标
    t2 = threading.Thread(target=job2,name='t2')
    t.start()
    t2.start()
    t.join()
    t2.join()

    print('all done\n')
if __name__ == '__main__':
    main()
